The code in gtk_widget_real_css_changed assumes that
queue_resize > queue_allocate > queue_draw, but the
second one is not really true. These days, we happily
keep reusing the same render node even when the child
allocation is changed.
So, if a css change has flags that tell us we should
redraw, we need to queue a draw, otherwise we might
end up reusing an outdated render node.
This fixes spinners staying visible when they stop
spinning, despite the theme setting their opacity
to 0.
{
gtk_widget_queue_allocate (priv->parent);
}
- else if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_REDRAW) ||
- (has_text && gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_CONTENT)))
+
+ if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_REDRAW) ||
+ (has_text && gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_CONTENT)))
{
gtk_widget_queue_draw (widget);
}